# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=socat
pkgver=1.7.4.4
pkgrel=1
pkgdesc='Multipurpose relay'
url='http://www.dest-unreach.org/socat/'
license=('GPL2')
arch=('loong64' 'x86_64')
depends=('glibc' 'readline' 'libreadline.so' 'openssl')
checkdepends=('bash' 'net-tools' 'procps-ng')
source=("http://www.dest-unreach.org/socat/download/${pkgname}-${pkgver}.tar.gz")
sha256sums=('0f8f4b9d5c60b8c53d17b60d79ababc4a0f51b3bb6d2bd3ae8a6a4b9d68f195e')
b2sums=('11330c8275b01a11644fd9f24cc4a197d81f367705fe0d4300a76d69f501b72c554f3719323c2e557a9dc372bc0aa10db13788b02b07227342b072d665523e79')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \

  make
}

check() {
  cd "${pkgname}-${pkgver}"
  # TODO: one of the tests always fails, but lets keep
  # it for manual sanity check
  make test||true
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
